x86/hvm: only call hvm_io_assist() from hvm_wait_for_io()
authorPaul Durrant <paul.durrant@citrix.com>
Thu, 9 Jul 2015 17:04:00 +0000 (19:04 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 10 Jul 2015 08:16:38 +0000 (10:16 +0200)
commitf4401bfef2071e25e9cf1d14f0e5ac687eefc9a1
tree0a12d9cfd3cae310f7f896d831ac9368d32cb05e
parent4faffc41dfeb7c5a59ce3597a2db7ca8a47d2fb3
x86/hvm: only call hvm_io_assist() from hvm_wait_for_io()

By removing the calls in hvmemul_do_io() (which is replaced by a single
assignment) and hvm_complete_assist_request() (which is replaced by a
call to hvm_process_portio_intercept() with a suitable set of ops) then
hvm_io_assist() can be moved into hvm.c and made static (and hence be a
candidate for inlining).

The calls to msix_write_completion() and vcpu_end_shutdown_deferral()
are also made unconditionally because the ioreq state will always be
STATE_IOREQ_NONE at the end of hvm_io_assist() so the test was
pointless. These calls are also only relevant when the emulation has
been handled externally which is now always the case.

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/arch/x86/hvm/emulate.c
xen/arch/x86/hvm/hvm.c
xen/arch/x86/hvm/io.c
xen/include/asm-x86/hvm/hvm.h
xen/include/asm-x86/hvm/io.h